import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 导入ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 全局导入element icons
import * as ELIcons from '@element-plus/icons-vue'
// 全局样式
import '@/styles/index.scss'

// 全局工具函数插件
import EUtils from '@/plugins/EUtils'
// 权限校验插件
import EAuth from '@/plugins/EAuth'
// SvgIcon 插件
import SvgIcon from '@/plugins/SvgIcon'
// EResize 插件
import EResize from '@/plugins/EResize'

const app = createApp(App)

app.use(router)
app.use(store)
app.use(EUtils)
app.use(EAuth)
app.use(SvgIcon)
app.use(EResize)

app.use(ElementPlus, { size: 'small', zIndex: 3000 })

for (const iconName in ELIcons) {
  app.component(iconName, ELIcons[iconName])
}
app.mount('#app')
